let xmpayOrderModule=require('./../module/xmpayOrderModule.js');
let json={
    'getmjxpay':function (req,res) {
        xmpayOrderModule.getmjxpay(req.body.JD_co,req.body.U_id,function (err, data) {
            console.log(req.body.U_id,req.body.JD_co,);
            if(err){
                console.log('数据库错误:'+err);
                res.send({error:1,xmjxorder:'数据库错误'});
            }else{
                if(data.length){
                    res.send({error:0,data:data});
                 }else{
                    res.send({error:1,xmjxorder:'数据不存在'});
                }
            }
        });
    },
    'xmpayok':function (req,res) {
        xmpayOrderModule.xmpayok(req.body.JD_co,req.body.JD_puon,req.body.XDzfdate,function (err, data) {
            console.log(req.body.JD_co,req.body.JD_puon,req.body.XDzfdate);
            if(err){
                console.log('数据库错误:'+err);
                res.send({error:1,xmjxorder:'数据库错误'});
            }else{
                res.send({error:0,xmjxorder:'成功'});
            }
        });
    },

};

module.exports=json;


